package com.magnificent.atlantis.client.data.settings;

import com.magnificent.atlantis.client.AtlantisConstants;
import com.magnificent.commons.utils.TimeConstants;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.HashMap;
import java.util.Map;

/**
 * User: Babanin
 * Date: 13.02.2009
 * Time: 15:58:25
 */
@XmlRootElement(name = "settings")
public class SettingsContainer {

    private int alertDividerLocation;
    private int messageDividerLocation;
    private long alertBefore;

    private boolean showLocalConfigurations;
    private boolean showServerConfigurations;

    private boolean showActiveTasks;
    private boolean showFinishedTasks;

    private Map<Integer, String> configurationToUser;

    public SettingsContainer() {
        configurationToUser = new HashMap<Integer, String>();
        showLocalConfigurations = true;
        showServerConfigurations = true;

        alertBefore = TimeConstants.MLS_IN_HOUR;
        alertDividerLocation = AtlantisConstants.EVENT_PANEL_DIVIDER_LOCATION;
        messageDividerLocation = AtlantisConstants.MESSAGE_PANEL_DIVIDER_LOCATION;
    }

    public Map<Integer, String> getConfigurationToUser() {
        return configurationToUser;
    }

    public void setConfigurationToUser(Map<Integer, String> configurationToUser) {
        this.configurationToUser = configurationToUser;
    }

    @XmlElement()
    public boolean isShowLocalConfigurations() {
        return showLocalConfigurations;
    }

    public void setShowLocalConfigurations(boolean showLocalConfigurations) {
        this.showLocalConfigurations = showLocalConfigurations;
    }

    @XmlElement()
    public boolean isShowServerConfigurations() {
        return showServerConfigurations;
    }

    public void setShowServerConfigurations(boolean showServerConfigurations) {
        this.showServerConfigurations = showServerConfigurations;
    }

    @XmlElement()
    public boolean isShowActiveTasks() {
        return showActiveTasks;
    }

    public void setShowActiveTasks(boolean showActiveTasks) {
        this.showActiveTasks = showActiveTasks;
    }

    @XmlElement()
    public boolean isShowFinishedTasks() {
        return showFinishedTasks;
    }

    public void setShowFinishedTasks(boolean showFinishedTasks) {
        this.showFinishedTasks = showFinishedTasks;
    }

    @XmlElement()
    public int getAlertDividerLocation() {
        return alertDividerLocation;
    }

    public void setAlertDividerLocation(int alertDividerLocation) {
        this.alertDividerLocation = alertDividerLocation;
    }

    @XmlElement()
    public long getAlertBefore() {
        return alertBefore;
    }

    public void setAlertBefore(long alertBefore) {
        this.alertBefore = alertBefore;
    }

    @XmlElement()
    public int getMessageDividerLocation() {
        return messageDividerLocation;
    }

    public void setMessageDividerLocation(int messageDividerLocation) {
        this.messageDividerLocation = messageDividerLocation;
    }
}
